package com.tfswx.jcyw;

import java.io.File;
import java.util.Scanner;

/**
 * @author ricky
 * @date 2022/7/28
 */
public class Demo {


    public static void main(String[] args) {
        // File mp3File1 = new File("D:\\华为云盘\\音乐\\小酒窝-林俊杰.mp3");
        File mp3File1 = new File("D:\\华为云盘\\音乐\\陈奕迅 - 好久不见 (铃声) [mqms].mp3");
        File mp3File2 = new File("D:\\华为云盘\\音乐\\张靓颖 - Dream It Possible (铃声) [mqms].mp3");
        File mp3File3 = new File("D:\\华为云盘\\音乐\\逃跑计划 - 夜空中最亮的星 (铃声) [mqms].mp3");

        File[] files = {mp3File1, mp3File2, mp3File3};
        Scanner sc = new Scanner(System.in);
        while (true) {
            System.out.println("请选择音乐");
            int next = sc.nextInt();
            if (next < 0) {
                break;
            }

            next = next % 3;

            File file = files[next];
            MusicPlayer.play(file);
        }
    }
}
